package com.amit.Basic_Simple_Program;

public class Generate_Armstrong 
{

	public static void main(String[] args) 
	{
	
       for(int i=1; i<=1000; i++)
       {
			
			int n = i;
			int sum = 0;
			
			for(;n>0;) {
				
				int rem = n % 10;
				sum = sum + (rem * rem * rem);
				n = n / 10;
			}
			
			if(sum == i) 
				System.out.println(i + " is an Armstrong number");
		}	
	}
}
